package second.little

/**
  * Created by feng on 24/11/2018.
  */
object OptionDemo {

  def main(args: Array[String]): Unit = {
    val map = Map("a"->1,"b"->2)

    val vector = map.get("c") match {
      case Some(i) => i
      case None => 0
    }
    println(vector)

    val v1 = map.getOrElse("c",12)
    println(v1)
  }



}
